home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 7 / Apprentice-Release7.iso / Source Code / C / Applications / POV-Ray 3.0.2 / Documentation / DOCDEMOS / TURBWALK.POV < prev   
Encoding:
Text File  |  1997-01-23  |  2.9 KB  |  124 lines  |  [TEXT/POV3]

  1. #include "all.inc"
  2. #include "color.inc"
  3.  
  4.  
  5. #declare Row=0
  6. #declare Col=0
  7. #declare Rows=10
  8. #declare Cols=10
  9.  
  10. #declare P1 = < 0.00,  0.00,  0.55>
  11. #declare P2 = < 0.00,  0.30,  0.55>
  12.  
  13. #declare P3 = < 0.40,  0.30,  0.15>
  14. #declare P4 = < 0.75,  0.30,  0.55>
  15. #declare P5 = < 0.75,  0.30,  0.15>
  16. #declare P6 = < 0.85,  0.30,  0.35>
  17.  
  18. #declare P7 = < 0.90,  0.30,  0.15>
  19. #declare P8 = < 0.90,  0.00,  0.15>
  20.  
  21. #declare R1 = 0.02
  22. #declare R2 = R1 * 0.9
  23. #declare R3 = R2 * 0.9
  24. #declare R4 = R3 * 0.9
  25. #declare R5 = R4 * 0.9
  26. #declare R6 = R5 * 0.9
  27. #declare R7 = R5 * 0.9
  28. #declare R8 = R5 * 0.9
  29.  
  30. union {
  31.     union {
  32.         #while(Row < Rows)
  33.         #declare Col=0
  34.             #while(Col < Cols)
  35.                 superellipsoid { <0.5, 0.5> scale 0.0475 translate <Row/Rows,
  36. 0.05, Col/Cols>
  37.                     #if( (mod(Row,4)=0) )
  38.                         texture { T_Red }
  39.                     #else
  40.                         texture { T_Green }
  41.                     #end
  42.                 }
  43.                #declare Col=Col+1
  44.             #end
  45.        #declare Row=Row+1
  46.     #end
  47.  
  48.         union {
  49.  
  50.           sphere { P1, R1  texture { T_Red } }
  51.           cone { P1, R1, P2 , R2
  52.               texture { T_Red }
  53.           }
  54.  
  55.           sphere { P2, R2  texture { T_Red }}
  56.           cone { P2, R2, P3 , R3
  57.               texture { T_Red }
  58.           }
  59.  
  60.           sphere { P3, R3  texture { T_Red } }
  61.           cone { P3, R3, P4, R4
  62.               texture { T_Red }
  63.           }
  64.  
  65.           sphere { P4, R4 texture { T_Red } }
  66.           cone { P4, R4, P5, R5
  67.             texture { T_Red }
  68.           }
  69.           sphere { P5, R5 texture { T_Red } }
  70.           cone { P5, R5, P6, R6
  71.             texture { T_Red }
  72.           }
  73.           sphere { P6, R6  texture { T_Red } }
  74.           cone { P6, R6, P7, R7
  75.               texture { T_Red }
  76.           }
  77.           sphere { P7, R7  texture { T_Red } }
  78.           cone { P7, R7, P8, R8
  79.               texture { T_Red }
  80.           }
  81.  
  82.           sphere { P8, R8  texture { T_Red } }
  83.           translate y*0.1
  84.       }
  85.  
  86.       text { ttf "crystal.ttf", "P", 1, 0
  87.          scale <0.25, 0.25, 0.05>
  88.          translate P1 + <-0.1, 0.15, 0>
  89.          texture { T_Red }
  90.          no_shadow
  91.       }
  92.  
  93.       text { ttf "crystal.ttf", "Q", 1, 0
  94.          scale <0.25, 0.25, 0.05>
  95.          translate P8 + <0.1, 0.15, 0>
  96.          texture { T_Red }
  97.          no_shadow
  98.       }
  99.  
  100.       text { ttf "crystal.ttf", "1st move", 0.33, 0
  101.          scale <0.115, 0.15, 0.02>
  102.          rotate y * 45
  103.          translate (P2) + (y * 0.125)
  104.          texture { T_Green finish {ambient 0.2} }
  105.          no_shadow
  106.       }
  107.  
  108.       text { ttf "crystal.ttf", "2nd move", 0.33, 0
  109.          scale <0.115, 0.15, 0.02>
  110.          rotate -y * 45
  111.          translate P3 + (y * 0.125)
  112.          texture { T_Green finish {ambient 0.2} }
  113.          no_shadow
  114.       }
  115.  
  116.       scale 3
  117.       translate <-1.5, -1, -1.5>
  118.       texture { T_Red }                  // dummy texture to avoid warning
  119.       no_shadow
  120.     }
  121.     rotate -y * 15
  122. }
  123.  
  124.